﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WDA.Core
{
	/// <summary>
	/// Defines interface of load-balancing component od WDAB.
	/// </summary>
	public interface ILoadBalancer
	{
		/// <summary>
		/// Choses most optimal (in terms of performance) instance of a service. In order to make a choice 
		/// is internally uses provided collection of so-called service monitors (services providing information
		/// on performance characteristics of business services).		
		/// </summary>
		/// <param name="serviceMonitors">Collection of service monitors and their unique ids.</param>
		/// <returns>Id of optimal service implementation.</returns>
		Guid ChooseBestServiceHost(IEnumerable<KeyValuePair<Guid, object>> serviceMonitors);
	}
}
